import Vue from 'vue'
import VueRouter from 'vue-router'
import Recommend from '../views/Recommend.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Recommend',
    component: Recommend,
  },
  {
    path: '/hot',
    name: 'Hot',
    component: () => import("@/views/Hot.vue")
  },
  {
    path: '/search',
    name: 'Search',
    component: () => import("@/views/Search.vue")
  },
  {
    path: '/playlist/:pid',
    name: 'Playlist',
    props: true,
    meta:{
      hidenav:true,
    },
    component: () => import("@/views/PlayList.vue")
  },
  {
    path: '/singer/:sid',
    name: 'Singer',
    props: true,
    meta:{
      hidenav:true,
    },
    component: () => import("@/views/Singer.vue")
  },
  {
    path: '/mv/:mid',
    name: 'Mv',
    props: true,
    meta:{
      hidenav:true,
    },
    component: () => import("@/views/Mv.vue")
  },
]

const router = new VueRouter({
  routes,
  mode: 'hash',
  base: process.env.BASE_URL,
  linkActiveClass: "top-nav-link-active",
  linkExactActiveClass: "top-nav-link-exac-active"
})

export default router
